<?php
	include '../User.php';
	$userlist=$_POST['users'];
	$xmlDoc = new DOMDocument();
	$xmlDoc->loadXML($userlist);
	$x = $xmlDoc->documentElement;
	#$file=fopen("log.txt",'w') or die("can't open file");
	$users=new User;
	foreach ($x->childNodes as $item)
        {
		$users->setUsername($item->nodeValue);
		$users->setPassword($_POST['pass']);
		$users->setRole($_POST['role']);
		$result=$users->signUp($_POST['role']);
	#	fwrite($file,$result);
        }
        #fclose($file);
?>
